<?php
//首页后台控制器
class IndexControl extends CommonControl{
	//后台首页显示
    function index(){
        $this->display();
    }
    //后台首页欢迎页
    public function copy(){
    	//p($_SERVER);
    	$this->display();
    }
    //密码修改
    public function password(){
    	if (IS_POST) {
    		$passwdF = $this->_POST('passwdF');
    		$passwdS = $this->_POST('passwdS');

    		if (strlen($passwdF) < 6) $this->error('密码不能小于6位！');
    		if($passwdF != $passwdS) $this->error('两次密码不相同！');

    		M('admin')->where(array('adid'=>session('adid')))->save(array('password'=>md5($passwdF)));
    		$this->success('密码修改成功！！！');
    		# code...
    	}

    	$this->display();
    }
}
?>